<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
	<head>
		<title><s:property value="%{getText('alrm_title')}" /></title>
		<link href="/SCMDB/style/SuperEdit.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="/SCMDB/js/Super.js"></script>
		<script type="text/javascript"
			src="/SCMDB/js/My97DatePicker/WdatePicker.js"></script>
		<%@ include file="../commonPage/message.jsp"%>
	</head>
	<body>

		<h2>
			<s:property value='%{getText("current_position")}' />${parentMenu}>>${currentMenu}
		</h2>
		<div class="main">
			<s:form action="alarmAction!findAll" method="post" theme="simple"
				name="form1">
				<fieldset  class="fieldSearch">
					<legend>
						<s:property value="%{getText('alrm_legend')}" />
					</legend>
					<table border="1" cellpadding="0" cellspacing="0">
						<tr>
							<td align="right" class="p_8">
								<s:property value="%{getText('alrm_tdall')}" />
							</td>
							<td>
								<s:select list="#session.ListAlarmType" name="entity.alarmType"
									listKey="id" listValue="alarmName" headerKey=""
									headerValue="--请选择--"></s:select>
							</td>
							<td align="right" class="p_14">
								<s:property value="%{getText('alrm_td3')}" />
							</td>
							<td>
								<s:textfield name="entity.name" cssClass="sInput"/>
							</td>
							<td align="right" class="p_8">
								<s:property value="%{getText('alrm_th6')}" />
							</td>
							<td>
								<s:select list="#session.confirmType" name="entity.confirmType"
									listKey="key" listValue="value" headerKey=""
									headerValue="--请选择--"></s:select>
							</td>
						</tr>
						<tr>
						<td align="right" class="p_8">
								开始时间：
							</td>
							<td>
								<s:textfield name="entity.startTime" cssClass="timeInput"
									readonly="true"
									onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})">
								</s:textfield>
							</td>

							<td align="right" class="p_14">
								结束时间：
							</td>
							<td>
								<s:textfield name="entity.endTime" cssClass="timeInput" readonly="true"
									onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})">
								</s:textfield>
							</td>
							<td  align="right" colspan="2">
									
							</td>
						</tr>
					</table>
				</fieldset>
				<p class="pEdit">
				<input type="button" id="bSearch" name="search" class="bSearch" value="查询"  onclick="loading()" />
					<input type="button" id="excel" name="excel" class="bExcel" value="导出Excel"
								onclick="location.href='alarmAction!alarmExcelReport.action'" />
				</p>
				<table border="0" cellpadding="1" cellspacing="1" class="tableList">
					<thead>
						<tr>
							<th >
								<s:property value="%{getText('alrm_th1')}" />
							</th>
							<th >
								<s:property value="%{getText('alrm_th2')}" />
							</th>
							<th >
								<s:property value="%{getText('alrm_th3')}" />
							</th>
							<th >
								<s:property value="%{getText('alrm_th4')}" />
							</th>
							<th >
								<s:property value="%{getText('alrm_th5')}" />
							</th>
							<th >
								<s:property value="%{getText('alrm_th7')}" />
							</th>
							<th >
								<s:property value="%{getText('alrm_th8')}" />
							</th>
							<th >
								备注
							</th>
							<th >
								确认状态
							</th>
						</tr>
					</thead>
					<tbody>
						<s:iterator id="pageBean" value="entity.list"
							status="u">
							<tr>
								<td class="number">
									${entity.index+u.index}
								</td>

								<td>
									${pageBean.alarmType}
								</td>

								<td>
									<a href="alarmAction!findEmp.action?id=${pageBean.empID}">
										${pageBean.empName} </a>
								</td>

								<td>
									${pageBean.depName}
								</td>
								<td>
									${pageBean.areaName}
								</td>
								<td>
									<s:property
										value='#pageBean.inTime.toString("yyyy-MM-dd HH:mm:ss")' />
								</td>
								<td>
									<s:property
										value='#pageBean.outTime.toString("yyyy-MM-dd HH:mm:ss")' />
								</td>
								<td>
									${pageBean.rmk}
								</td>

								<td>
									<s:if test='%{state=="0"}'><s:property value='%{getText("alrm_s1")}' /></s:if>
									<s:else><s:property value='%{getText("alrm_s2")}' /></s:else>
								</td>

							</tr>
						</s:iterator>
						<tr>
							<td colspan="8" class="turnPage">
								<jsp:include flush="true" page="../commonPage/page.jsp">
									<jsp:param name="entity" value="entity" />
								</jsp:include>
							</td>
						</tr>
					</tbody>
				</table>
			</s:form>
		</div>
		<div id="loading" style="display:none;"></div>
	</body>
</html>
